from django.conf.urls import url

from . import views

urlpatterns = [

    url(r'^infos/$',views.ProvienceAPIView.as_view()),

    url(r'^infos/(?P<pk>\d+)/$',views.CityAPIView.as_view()),


]

# 1、导入
from rest_framework.routers import DefaultRouter
# 2、创建实例router
router = DefaultRouter()
# 3、注册
router.register(r'infos',views.AreaModelViewSet,base_name='')
# 4、添加到urlpatterns
urlpatterns += router.urls






